<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div id="app">
            <router-link to="/pic">点击显示</router-link>
            <router-view></router-view>
        </div>
        <script src="vue.js"></script>
        <script src="vue-router.js"></script>
        <script>
            let pic = {
                template: `<h3>只是段文字</h3>`,
            };

            let routes = [
                {
                    path: "/pic",
                    component: pic,
                },
            ];

            let router = new VueRouter({
                routes,
            });
            let vm = new Vue({
                router,
                el: "#app",
                data: {},
            });
        </script>
    </body>
</html>
